home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 273_01.zip / WRITETTY.CC < prev    next >
Text File  |  1993-04-04  |  625b  |  30 lines

  1. #include <dos.h>
  2. write_tty(char *ch)
  3. /* This will put the character string pointer to by *ch on the screen
  4.    at the current cursor location using attribute attr.
  5. */
  6. {
  7. union REGS inregs;
  8.         while(*ch) {
  9.                 inregs.h.bh=0;
  10.                 inregs.h.bl=0;
  11.                 inregs.h.al=*ch;
  12.                 inregs.h.ah=0x0e;
  13.                 int86(0x10,&inregs,&inregs);
  14.                 ch++;
  15.         }
  16.        inregs.h.bh=0;
  17.        inregs.h.bl=0;
  18.        inregs.h.al=0x0d;
  19.        inregs.h.ah=0x0e;
  20.        int86(0x10,&inregs,&inregs);
  21.  
  22.        inregs.h.bh=0;
  23.        inregs.h.bl=0;
  24.        inregs.h.al=0x0a;
  25.        inregs.h.ah=0x0e;
  26.        int86(0x10,&inregs,&inregs);
  27. }
  28.  
  29.  
  30.